import { defineStore } from 'pinia'

export const useCategoryStore = defineStore('category', {
  state() {
    return {
      categoryDict: [],
    }
  },
  actions: {
    getCategoryById(categoryId) {
      return this.categoryDict[categoryId]
    },
    setCategory(categoryDict) {
      this.categoryDict = categoryDict
    },
  },
})
